modemmanager: backport commit fixing crash with Fibocom mtk-7xx modems
authorDaniel Golle <[email protected]>
Sat, 19 Apr 2025 18:36:54 +0000 (19:36 +0100)
committerRobert Marko <[email protected]>
Wed, 23 Apr 2025 13:11:06 +0000 (15:11 +0200)
Backport commit
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/commit/046b79a6766b6384db9cd56a9af5d148787bafe4

See also
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/975

Signed-off-by: Daniel Golle <[email protected]>
net/modemmanager/Makefile
net/modemmanager/patches/0001-shared-fibocom-don-t-assume-parent-implements-the-fi.patch [new file with mode: 0644]

index 0789f4a315fc8b70d53ee1a5a09917f1ddfab00c..d6c5d1917ea158a06a9bb5b0191d053752f07e2f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=modemmanager
 PKG_VERSION:=1.24.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git
diff --git a/net/modemmanager/patches/0001-shared-fibocom-don-t-assume-parent-implements-the-fi.patch b/net/modemmanager/patches/0001-shared-fibocom-don-t-assume-parent-implements-the-fi.patch
new file mode 100644 (file)
index 0000000..b440405
--- /dev/null
@@ -0,0 +1,28 @@
+From 046b79a6766b6384db9cd56a9af5d148787bafe4 Mon Sep 17 00:00:00 2001
+From: Dan Williams <[email protected]>
+Date: Sat, 12 Apr 2025 23:56:13 -0500
+Subject: [PATCH] shared-fibocom: don't assume parent implements the firmware
+ interface
+
+MMBroadbandModemMbimMtkFibocom doesn't, so don't assert it.
+
+Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/975
+
+Signed-off-by: Dan Williams <[email protected]>
+---
+ src/plugins/fibocom/mm-shared-fibocom.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/src/plugins/fibocom/mm-shared-fibocom.c
++++ b/src/plugins/fibocom/mm-shared-fibocom.c
+@@ -75,8 +75,8 @@ get_private (MMSharedFibocom *self)
+         priv->class_parent = MM_SHARED_FIBOCOM_GET_IFACE (self)->peek_parent_class (self);
+         /* Setup firmware interface of parent class */
+-        g_assert (MM_SHARED_FIBOCOM_GET_IFACE (self)->peek_parent_firmware_interface);
+-        priv->iface_modem_firmware_parent = MM_SHARED_FIBOCOM_GET_IFACE (self)->peek_parent_firmware_interface (self);
++        if (MM_SHARED_FIBOCOM_GET_IFACE (self)->peek_parent_firmware_interface)
++            priv->iface_modem_firmware_parent = MM_SHARED_FIBOCOM_GET_IFACE (self)->peek_parent_firmware_interface (self);
+         g_object_set_qdata_full (G_OBJECT (self), private_quark, priv, (GDestroyNotify)private_free);
+     }